gtk4.git
6 years agoclipboard: file transfer portal support
Matthias Clasen [Mon, 3 Sep 2018 22:36:56 +0000 (18:36 -0400)]
clipboard: file transfer portal support

Implement file-list <-> application/vnd.flatpak.file-list
serialization by talking to the file transfer portal.

See https://github.com/flatpak/xdg-desktop-portal/pull/222

6 years agoMerge branch 'honor-hotspot-gtk4' into 'master'
Christoph Reiter [Wed, 11 Dec 2019 12:59:23 +0000 (12:59 +0000)]
Merge branch 'honor-hotspot-gtk4' into 'master'

gdk/x11: Honor hotspot during drag cancel animation

See merge request GNOME/gtk!1236

6 years agoMerge branch 'vulkan-no-layered-windows' into 'master'
Chun-wei Fan [Wed, 11 Dec 2019 06:24:49 +0000 (06:24 +0000)]
Merge branch 'vulkan-no-layered-windows' into 'master'

Win32: Do not enable layered windows when using Vulkan

See merge request GNOME/gtk!1217

6 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Tue, 10 Dec 2019 03:05:09 +0000 (03:05 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

widget factory: Fix more grid layout fallout

See merge request GNOME/gtk!1237

6 years agowidget factory: Fix more grid layout fallout
Matthias Clasen [Tue, 10 Dec 2019 02:29:03 +0000 (21:29 -0500)]
widget factory: Fix more grid layout fallout

6 years agoa11y: We can peek here
Benjamin Otte [Sun, 8 Dec 2019 05:26:58 +0000 (06:26 +0100)]
a11y: We can peek here

Avoids instantiating a11y objects when we don't need to.

6 years agotreeview: Don't create a cyclic reference
Benjamin Otte [Sun, 8 Dec 2019 05:26:26 +0000 (06:26 +0100)]
treeview: Don't create a cyclic reference

TreeRowReference refs the proxy object, so don't use proxies.

6 years agolabel: Compute label baselines correctly
Benjamin Otte [Sun, 8 Dec 2019 04:32:35 +0000 (05:32 +0100)]
label: Compute label baselines correctly

When we were switching smallest and widest, we were not switching the
baselines.

6 years agogdk/x11: Honor hotspot during drag cancel animation
Robert Mader [Mon, 9 Dec 2019 00:45:27 +0000 (01:45 +0100)]
gdk/x11: Honor hotspot during drag cancel animation

Otherwise the icon "jumps" to the cursor position with its top left when
the animation starts.
This is especially visible if the dragged item is big, like when dragging
mails in Thunderbird.

6 years agoAdd GtkTreeListRow type to the docs
Matthias Clasen [Sun, 8 Dec 2019 22:58:09 +0000 (17:58 -0500)]
Add GtkTreeListRow type to the docs

6 years agoAdd missing listmodel and selection types to the docs
Matthias Clasen [Sun, 8 Dec 2019 18:48:52 +0000 (13:48 -0500)]
Add missing listmodel and selection types to the docs

6 years agotree list model: Add a missing annotation
Matthias Clasen [Sun, 8 Dec 2019 03:39:35 +0000 (22:39 -0500)]
tree list model: Add a missing annotation

The GtkTreeListModelCreateModelFunc returns
a new reference.

6 years agoinspector: Avoid critical warnings
Matthias Clasen [Sun, 8 Dec 2019 00:39:02 +0000 (19:39 -0500)]
inspector: Avoid critical warnings

We were still using this but it's not defined in the UI xml.

Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2295
6 years agoMerge branch 'inspector-display' into 'master'
Matthias Clasen [Sat, 7 Dec 2019 23:20:51 +0000 (23:20 +0000)]
Merge branch 'inspector-display' into 'master'

Inspector display

See merge request GNOME/gtk!1234

6 years agoinspector: Make the css tree respect inspected display
Matthias Clasen [Sat, 7 Dec 2019 17:42:37 +0000 (12:42 -0500)]
inspector: Make the css tree respect inspected display

The display is used here to force reparsing the theme
on the right settings object.

6 years agoinspector: Make logs respect inspected display
Matthias Clasen [Sat, 7 Dec 2019 17:31:10 +0000 (12:31 -0500)]
inspector: Make logs respect inspected display

6 years agoinspector: Make inspect button use inspected display
Matthias Clasen [Sat, 7 Dec 2019 17:30:40 +0000 (12:30 -0500)]
inspector: Make inspect button use inspected display

This may not matter, but just for cleanliness.

6 years agoinspector: Make general respect inspected display
Matthias Clasen [Sat, 7 Dec 2019 17:30:15 +0000 (12:30 -0500)]
inspector: Make general respect inspected display

6 years agoinspector: Make visual settings respect the inspected display
Matthias Clasen [Sat, 7 Dec 2019 17:07:12 +0000 (12:07 -0500)]
inspector: Make visual settings respect the inspected display

This is not quite complete, GTK and GSK debug flags
are not per display, and slowdown and text direction
are not either.

6 years agoinspector: Make css editor respect inspected display
Matthias Clasen [Sat, 7 Dec 2019 16:48:39 +0000 (11:48 -0500)]
inspector: Make css editor respect inspected display

Stop using gdk_display_get_default and use the
inspected display instead.

6 years agoinspector: Make object tree respect inspected display
Matthias Clasen [Sat, 7 Dec 2019 16:49:30 +0000 (11:49 -0500)]
inspector: Make object tree respect inspected display

Stop using gdk_display_get_dfault and use the
inspected display instead.

6 years agowindow: Get rid of the inspector_window static
Matthias Clasen [Sat, 7 Dec 2019 16:08:34 +0000 (11:08 -0500)]
window: Get rid of the inspector_window static

Use the new per-display inspector plumbing and
stop relying on a static variable.

6 years agoinspector: Attach inspector window to display
Matthias Clasen [Sat, 7 Dec 2019 15:54:10 +0000 (10:54 -0500)]
inspector: Attach inspector window to display

Give the inspector window a ::inspected-display
property, and pass a display when obtaining an
inspector window. Update the caller.

6 years agowindow: Inspector cleanups
Matthias Clasen [Sat, 7 Dec 2019 15:34:17 +0000 (10:34 -0500)]
window: Inspector cleanups

Reduce the use of the inspector_window static.
The goal is to have one inspector window per
display, so we need to get rid of the static.

6 years agowindow: Remove inspector updating fully
Matthias Clasen [Sat, 7 Dec 2019 15:05:26 +0000 (10:05 -0500)]
window: Remove inspector updating fully

Commit 05e752e096722 left some ruins behind.
Clean that up.

6 years agoinspector: Init yourself
Matthias Clasen [Sat, 7 Dec 2019 15:00:41 +0000 (10:00 -0500)]
inspector: Init yourself

No need to have GTK call this from the outside.

6 years agoinspector: Cleanup
Matthias Clasen [Sat, 7 Dec 2019 16:22:07 +0000 (11:22 -0500)]
inspector: Cleanup

Remove an unused enum.

6 years agoMake a test with a custom display
Matthias Clasen [Sat, 7 Dec 2019 14:49:10 +0000 (09:49 -0500)]
Make a test with a custom display

This completely breaks the inspector.

6 years agoMerge branch 'doc-update' into 'master'
Matthias Clasen [Thu, 5 Dec 2019 22:11:31 +0000 (22:11 +0000)]
Merge branch 'doc-update' into 'master'

doc: Cleanup doc removing mentions of gdk_surface_shape_combine_region()

See merge request GNOME/gtk!1232

6 years agodoc: Cleanup doc removing mentions of gdk_surface_shape_combine_region()
Hubert Figuière [Thu, 5 Dec 2019 13:57:19 +0000 (08:57 -0500)]
doc: Cleanup doc removing mentions of gdk_surface_shape_combine_region()

6 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Thu, 5 Dec 2019 00:01:23 +0000 (00:01 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

fix leaks in the testsuite

See merge request GNOME/gtk!1231

6 years agoFix treelistmodel tests
Matthias Clasen [Wed, 4 Dec 2019 23:30:37 +0000 (18:30 -0500)]
Fix treelistmodel tests

They were failing to return a reference where they
need to. This was uncovered by fixing an unrelated
ref leak.

6 years agoFix leaks in tests
Matthias Clasen [Wed, 4 Dec 2019 12:51:04 +0000 (07:51 -0500)]
Fix leaks in tests

All the list model tests were leaking items,
because g_list_model_get_item is transfer full.

Fixing these unveils a crash in the treelistmodel
and maplistmodel tests.

6 years agoUpdate German translation
Tim Sabsch [Wed, 4 Dec 2019 19:37:01 +0000 (19:37 +0000)]
Update German translation

6 years agobuilder: Improve error message
Benjamin Otte [Sun, 1 Dec 2019 12:52:35 +0000 (13:52 +0100)]
builder: Improve error message

6 years agobuilder: Allow objects in gtk_builder_value_from_string_type()
Benjamin Otte [Mon, 25 Nov 2019 05:06:31 +0000 (06:06 +0100)]
builder: Allow objects in gtk_builder_value_from_string_type()

Instead of throwing an error, lookup objects with
gtk_builder_get_object().

6 years agogtk-demo: Use normal way to lookup up symbols
Benjamin Otte [Fri, 29 Nov 2019 07:48:48 +0000 (08:48 +0100)]
gtk-demo: Use normal way to lookup up symbols

We're a normal application, so we can use the normal way to hook up code
into builder files, which is using dlsym() for the function pointers.

There's no need to to extra work exporting static symbols.

6 years agocss: Handle invalid :not() selectors
Benjamin Otte [Mon, 2 Dec 2019 16:31:15 +0000 (17:31 +0100)]
css: Handle invalid :not() selectors

We weren't correctly ending the ( ) block when encountering an error.

Testcases added.

Fixes #2281

6 years agoMerge branch 'wip/wayland-hidpi-swap-region' into 'master'
Timm Bäder [Tue, 3 Dec 2019 16:05:08 +0000 (16:05 +0000)]
Merge branch 'wip/wayland-hidpi-swap-region' into 'master'

Fix HiDPI swap regions on Wayland

See merge request GNOME/gtk!1228

6 years agowayland/vulkancontext: Fix present region on HiDPI
Jonas Ådahl [Tue, 3 Dec 2019 15:42:03 +0000 (16:42 +0100)]
wayland/vulkancontext: Fix present region on HiDPI

VkPresentRegionsKHR is expected to operate in buffer coordinates, but
the region we get passed is in surface coordinates, so it must be scaled.

6 years agowayland/glcontext: Fix damage region on HiDPI
Jonas Ådahl [Tue, 3 Dec 2019 15:32:59 +0000 (16:32 +0100)]
wayland/glcontext: Fix damage region on HiDPI

The passed regions are in surface coordinates, but
eglSwapBuffersWithDamage() is in buffer coordinates.

6 years agoMerge branch 'fix-treemodelsort_processed_as_treemodel' into 'master'
Emmanuele Bassi [Tue, 3 Dec 2019 15:36:43 +0000 (15:36 +0000)]
Merge branch 'fix-treemodelsort_processed_as_treemodel' into 'master'

Annotate GtkTreeModelSort.new_with_model() appropriately

See merge request GNOME/gtk!1134

6 years agoAnnotate GtkTreeModelSort.new_with_model() appropriately
LutzLue [Tue, 3 Dec 2019 15:36:42 +0000 (15:36 +0000)]
Annotate GtkTreeModelSort.new_with_model() appropriately

The new_with_model() method is a constructor, and it returns a GtkTreeModelSort
instance, even if the C API returns a GtkTreeModel for the convenience of C
developers.

Fixes: #1077
6 years agogl renderer: Implement blurred inset shadow nodes
Timm Bäder [Sat, 30 Nov 2019 11:44:30 +0000 (12:44 +0100)]
gl renderer: Implement blurred inset shadow nodes

And with this...

Fixes #1101

6 years agogl renderer: Remove unused uniform from inset shadow shader
Timm Bäder [Sat, 30 Nov 2019 11:44:15 +0000 (12:44 +0100)]
gl renderer: Remove unused uniform from inset shadow shader

6 years agoopbuffer: Remove unused op member
Timm Bäder [Sat, 30 Nov 2019 11:43:49 +0000 (12:43 +0100)]
opbuffer: Remove unused op member

6 years agotestsuite: Add an inset shadow rendering test case
Timm Bäder [Sat, 30 Nov 2019 08:26:01 +0000 (09:26 +0100)]
testsuite: Add an inset shadow rendering test case

6 years agogl renderer: Cache current scale in RenderOpBuilder
Timm Bäder [Fri, 29 Nov 2019 13:40:20 +0000 (14:40 +0100)]
gl renderer: Cache current scale in RenderOpBuilder

We call ops_get_scale a lot, so this should be better. It will also make
a later x/y split for the scaling easier.

6 years agocssshadowvalue: Simplify inset shadow nodes to color nodes if possible
Timm Bäder [Fri, 29 Nov 2019 12:34:22 +0000 (13:34 +0100)]
cssshadowvalue: Simplify inset shadow nodes to color nodes if possible

inset shadows like this are frequently used to implement highlights in
CSS without crowing them min size of the element.

6 years agogl renderer: Save one level of indentation
Timm Bäder [Fri, 29 Nov 2019 09:47:40 +0000 (10:47 +0100)]
gl renderer: Save one level of indentation

6 years agowindow: Don't set invalid csd input shape
Timm Bäder [Fri, 29 Nov 2019 09:02:14 +0000 (10:02 +0100)]
window: Don't set invalid csd input shape

This might happen if the CSS values of the decoration node are broken,
e.g. if people *accidentally* type large negative values for the
margins.

Fixes #2268

6 years agosnapshot: Reorder color matrix nodes containing a transform node
Timm Bäder [Fri, 29 Nov 2019 08:14:55 +0000 (09:14 +0100)]
snapshot: Reorder color matrix nodes containing a transform node

A color matrix node that contains a transform node can also be expressed
the other way around, as a transform node containing a color matrix
node.

In the general case, the color matrix node will have to draw its
child to a texture so it can color every pixel of that texture, but the
renderers can short-cut this if the child of the color matrix node is
already a texture node. So if we have a node tree like

Color Matrix
    - Transform
        - Texture

The renderer would have to either check the grandchild of the color
matrix or simply fall back to rendering the transform node to a texture.

In the new configuration:

Transform
    - Color Matrix
        - Texture

The renderer can easily see that the child node of the color matrix node
is a texture, and skip rendering it to a texture.

This is for example happening in current Adwaita for spinners, which are
rotated symbolics.

6 years agosnapshot: Factor out color matrix merging
Timm Bäder [Fri, 29 Nov 2019 08:13:27 +0000 (09:13 +0100)]
snapshot: Factor out color matrix merging

We will use that elsewhere in the next commit.

6 years agogl renderer: Implement blurred shadow nodes
Timm Bäder [Fri, 29 Nov 2019 05:54:43 +0000 (06:54 +0100)]
gl renderer: Implement blurred shadow nodes

6 years agogl renderer: Take a TextureRegion in blur_texture
Timm Bäder [Fri, 29 Nov 2019 05:53:57 +0000 (06:53 +0100)]
gl renderer: Take a TextureRegion in blur_texture

So we can refer to textures on a texture atlas.

6 years agogl renderer: Scale blur radius
Timm Bäder [Fri, 29 Nov 2019 05:50:44 +0000 (06:50 +0100)]
gl renderer: Scale blur radius

We scale the texture size, so as a consequence we have to scale the blur
radius.

6 years agogl renderer: Add some often needed debug code
Timm Bäder [Thu, 28 Nov 2019 08:01:56 +0000 (09:01 +0100)]
gl renderer: Add some often needed debug code

6 years agogl renderer: Blur shader improvements
Timm Bäder [Tue, 26 Nov 2019 08:38:53 +0000 (09:38 +0100)]
gl renderer: Blur shader improvements

Use a two-pass blur shader, fix a few other things and unify the
blurring of blur nodes and blurred outset shadow nodes.

Related to #1283

6 years agotestblur: Fix default blur radius
Timm Bäder [Tue, 19 Nov 2019 14:40:08 +0000 (15:40 +0100)]
testblur: Fix default blur radius

sync it up with the adjustment value. also just add the destroyed
handler.

6 years agoMerge branch 'improve-popover-menu-style' into 'master'
Matthias Clasen [Mon, 2 Dec 2019 13:19:50 +0000 (13:19 +0000)]
Merge branch 'improve-popover-menu-style' into 'master'

Adwaita: Improve popover.menu styling

See merge request GNOME/gtk!1083

6 years agoAdwaita: Remove unused popover check/radio styling
nana-4 [Thu, 7 Nov 2019 13:50:09 +0000 (22:50 +0900)]
Adwaita: Remove unused popover check/radio styling

6 years agoAdwaita: Flatten circular buttons in popover.menu
nana-4 [Thu, 7 Nov 2019 13:34:01 +0000 (22:34 +0900)]
Adwaita: Flatten circular buttons in popover.menu

Just reuse the list button style.

https://gitlab.gnome.org/GNOME/gtk/issues/1824

6 years agoAdwaita: Make check & radio symbolic icon style in popover.menu
nana-4 [Thu, 7 Nov 2019 13:00:20 +0000 (22:00 +0900)]
Adwaita: Make check & radio symbolic icon style in popover.menu

The disabled modelbutton color needs to be specified explicitly
in order for check & radio to properly read the color with
currentColor.

https://gitlab.gnome.org/GNOME/gtk/issues/1824

6 years agoAdwaita: Improve popover.menu styling
nana-4 [Thu, 7 Nov 2019 12:35:40 +0000 (21:35 +0900)]
Adwaita: Improve popover.menu styling

Based on the mockup:
https://gitlab.gnome.org/Teams/Design/os-mockups/blob/master/menus/menu-design-patterns.png

- Remove horizontal padding from popover.menu contents
- Remove roundness from modelbutton
- Adjust sizing to match the mockup
- Fix visual glitches on button.image-button.model
- Add missing mergin to arrow icons
- Fix accelerator position in rtl direction
- Fix accelerator color

https://gitlab.gnome.org/GNOME/gtk/issues/1824

6 years agoMerge branch 'wip/muktupavels/opaque-region-master' into 'master'
Matthias Clasen [Sun, 1 Dec 2019 15:11:00 +0000 (15:11 +0000)]
Merge branch 'wip/muktupavels/opaque-region-master' into 'master'

window: fix opaque region

See merge request GNOME/gtk!1222

6 years agoMerge branch 'sass-no-extend-compound-master' into 'master'
Matthias Clasen [Sun, 1 Dec 2019 15:09:39 +0000 (15:09 +0000)]
Merge branch 'sass-no-extend-compound-master' into 'master'

themes: remove various @extend with compound selectors

See merge request GNOME/gtk!1223

6 years agothemes: remove various @extend with compound selectors
nana-4 [Sun, 1 Dec 2019 01:43:16 +0000 (10:43 +0900)]
themes: remove various @extend with compound selectors

They are no longer supported by sass and broken with libsass 3.6.3
(https://github.com/sass/libsass/issues/3033)

This removes them by replacing them with a placeholder selector. This at
least brings the resulting CSS size down a bit so gtk can be build
again.

`%button.flat.suggested-action` has been replaced by
`%selection_mode_button_flat`, which is a more appropriate selector for
`.selection-mode button.titlebutton`.

The CSS was generated with libsass 3.5.5.

Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
See https://gitlab.gnome.org/GNOME/gtk/issues/2237

6 years agowindow: fix opaque region
Alberts Muktupāvels [Sat, 30 Nov 2019 18:19:26 +0000 (20:19 +0200)]
window: fix opaque region

Decoration node for drawing is used only for client side decorated
windows, but corners from opaque region is subtracted also for
normal windows.

Rename function to better reflect what it does and do not subtract
corners if decoration node was not used for drawing.

6 years agoMerge branch 'gtk-link-color' into 'master'
Timm Bäder [Sat, 30 Nov 2019 07:40:48 +0000 (07:40 +0000)]
Merge branch 'gtk-link-color' into 'master'

Adwaita: always use link specific colors for link selector

See merge request GNOME/gtk!1201

6 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 29 Nov 2019 15:21:40 +0000 (15:21 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

some builder-tool tests

See merge request GNOME/gtk!1220

6 years agoUpdate the test scripts
Matthias Clasen [Fri, 29 Nov 2019 14:51:35 +0000 (09:51 -0500)]
Update the test scripts

All tools got renamed to have a gtk4 prefix.

6 years agoAdd a test for the previous fix
Matthias Clasen [Fri, 29 Nov 2019 14:50:04 +0000 (09:50 -0500)]
Add a test for the previous fix

6 years agoMerge branch 'matthiasc/for-master' into 'master'
Matthias Clasen [Fri, 29 Nov 2019 14:00:05 +0000 (14:00 +0000)]
Merge branch 'matthiasc/for-master' into 'master'

builder-tool: Fix handling of layout properties

See merge request GNOME/gtk!1219

6 years agobuilder-tool: Fix handling of layout properties
Matthias Clasen [Fri, 29 Nov 2019 13:47:35 +0000 (08:47 -0500)]
builder-tool: Fix handling of layout properties

We were not properly identifying layout properties
that need to be kept, causing GtkGrid left-attachment
to go missing in widget-factory.ui.

6 years agoFix up widget-factory ui
Matthias Clasen [Fri, 29 Nov 2019 13:34:09 +0000 (08:34 -0500)]
Fix up widget-factory ui

6 years agoMerge branch 'dont-color-labels-directly-gtk4' into 'master'
Timm Bäder [Fri, 29 Nov 2019 11:53:07 +0000 (11:53 +0000)]
Merge branch 'dont-color-labels-directly-gtk4' into 'master'

Adwaita: Avoid directly coloring labels wherever possible (GTK4)

Closes #1643

See merge request GNOME/gtk!1209

6 years agoreftests: Fix css-multi-state test
Timm Bäder [Fri, 29 Nov 2019 10:23:10 +0000 (11:23 +0100)]
reftests: Fix css-multi-state test

Properly unset theme CSS and use the right selector for the toggle
buttons.

6 years agoAdwaita: always use link specific colors for link selector
Carlo Lobrano [Thu, 21 Nov 2019 11:32:37 +0000 (12:32 +0100)]
Adwaita: always use link specific colors for link selector

link target uses `$selected_bg_color` and `$selected_fg_color` for the
definition of some selectors (e.g. selected).

While `$link_color` and `$link_visited_color` are based on
`$selected_bg_color`, this does not seem coherent.

Replacing `$selected_*g_color` in link target style with link colors
defined in `_colors.scss file`.

6 years agowidget-factory: Fix a popover menu
Matthias Clasen [Wed, 27 Nov 2019 22:41:44 +0000 (17:41 -0500)]
widget-factory: Fix a popover menu

This one is manually constructed, and things have
changed enough for that to break. Fix it up.

6 years agogl renderer: Don't use g_assert() for code that should always run
Timm Bäder [Wed, 27 Nov 2019 15:56:47 +0000 (16:56 +0100)]
gl renderer: Don't use g_assert() for code that should always run

g_assert can be compiled out.

6 years agogl renderer: Don't save repeat nodes to disk
Timm Bäder [Wed, 27 Nov 2019 15:47:14 +0000 (16:47 +0100)]
gl renderer: Don't save repeat nodes to disk

This is just debuggin code someone forgot.

6 years agoMerge branch 'single-compilation-symbol' into 'master'
Matthias Clasen [Wed, 27 Nov 2019 15:14:54 +0000 (15:14 +0000)]
Merge branch 'single-compilation-symbol' into 'master'

Use a single compilation symbol

See merge request GNOME/gtk!1216

6 years agoMerge branch 'fix-issue-1646-master' into 'master'
Timm Bäder [Wed, 27 Nov 2019 13:52:08 +0000 (13:52 +0000)]
Merge branch 'fix-issue-1646-master' into 'master'

HighContrast: Add missing color to entry

Closes #1646

See merge request GNOME/gtk!1215

6 years agoUse a single compilation symbol
Emmanuele Bassi [Wed, 27 Nov 2019 13:33:43 +0000 (13:33 +0000)]
Use a single compilation symbol

We use a compilation symbol in our build to allow the inclusion of
specific headers while building GTK, to avoid the need to include only
the global header.

Each namespace has its own compilation symbol because we used to have
different libraries, and strict symbol visibility between libraries;
now that we have a single library, and we can use private symbols across
namespaces while building GTK, we should have a single compilation
symbol, and simplify the build rules.

6 years agoHighContrast: Add missing color to entry
nana-4 [Wed, 27 Nov 2019 13:22:11 +0000 (22:22 +0900)]
HighContrast: Add missing color to entry

So entries don't inherit color from the parent element anymore.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1646

6 years agoMerge branch 'broken-annotation' into 'master'
Timm Bäder [Wed, 27 Nov 2019 06:46:15 +0000 (06:46 +0000)]
Merge branch 'broken-annotation' into 'master'

builder: Fix broken annotation

See merge request GNOME/gtk!1213

6 years agobuilder: Fix broken annotation
Robert Ancell [Wed, 27 Nov 2019 03:06:36 +0000 (16:06 +1300)]
builder: Fix broken annotation

Missing a ':', was introduced in 0627bba5a0d.

6 years agogdkvulkancontext-win32.c: Suppress layered Windows on Vulkan
Chun-wei Fan [Tue, 26 Nov 2019 08:07:08 +0000 (16:07 +0800)]
gdkvulkancontext-win32.c: Suppress layered Windows on Vulkan

The Vulkan renderer does not work well with layered windows enabled, so
turn it off when we successfully created the Vulkan context on Windows.

6 years agogl renderer: Load flipped-y offscreen vertex data directly
Timm Bäder [Tue, 26 Nov 2019 07:58:38 +0000 (08:58 +0100)]
gl renderer: Load flipped-y offscreen vertex data directly

Instead of loading the unflipped version first and then flipping it.
Don't do it in add_render_ops either but only in the function actually
adding the render ops for the nodes, since those frequently have
early-out conditions that don't need the vertex data at all.

6 years agotestsuite: Add another repeat node test case
Timm Bäder [Tue, 26 Nov 2019 07:41:23 +0000 (08:41 +0100)]
testsuite: Add another repeat node test case

6 years agogl renderer: Fix repeat node shader once again
Timm Bäder [Tue, 26 Nov 2019 07:38:41 +0000 (08:38 +0100)]
gl renderer: Fix repeat node shader once again

6 years agogl renderer: Care more about 0×0 offscreen nodes
Timm Bäder [Sat, 23 Nov 2019 09:20:15 +0000 (10:20 +0100)]
gl renderer: Care more about 0×0 offscreen nodes

These never result in a rendering of course, but we must make sure not
to create a 0×0 texture for them, since that will cause problems later
on.

6 years agoMerge branch 'unsafe-strdup-printf' into 'master'
Timm Bäder [Tue, 26 Nov 2019 07:11:19 +0000 (07:11 +0000)]
Merge branch 'unsafe-strdup-printf' into 'master'

gtk-demo: Fix incorrect use of g_strdup_printf

See merge request GNOME/gtk!1211

6 years agogtk-demo: Fix incorrect use of g_strdup_printf
Robert Ancell [Mon, 25 Nov 2019 21:11:28 +0000 (10:11 +1300)]
gtk-demo: Fix incorrect use of g_strdup_printf

Was broken in a refactoring in 4a2f313

6 years agoAdwaita: Avoid directly coloring labels wherever possible
nana-4 [Mon, 25 Nov 2019 15:39:33 +0000 (00:39 +0900)]
Adwaita: Avoid directly coloring labels wherever possible

Directly coloring labels can create a lot of unintended behaviors.
Unfortunately we can't avoid directly coloring `label:disabled` because
it can be used individually. This, however, tries to inherit color from
the parent element of labels wherever possible.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1643

6 years agotestsuite: Fix expected test output
Benjamin Otte [Sat, 23 Nov 2019 18:33:36 +0000 (19:33 +0100)]
testsuite: Fix expected test output

This reverts part of 91497348bf1ea90ef1056bdc8727bbea645c21e3

6 years agocssprovider: Don't add empty rulesets
Benjamin Otte [Sat, 23 Nov 2019 18:01:28 +0000 (19:01 +0100)]
cssprovider: Don't add empty rulesets

This change was lost during the parser changes, but the newly added test
exposes it.

And fix the expected error, the syntax has changed.

6 years agoFix crash in parse_border()
Alexandr Miloslavskiy [Thu, 21 Nov 2019 19:26:22 +0000 (20:26 +0100)]
Fix crash in parse_border()

The bug was introduced in commit:
9b7640b8 by Benjamin Otte, 2012-03-26 17:24:02
styleproperty: Make _gtk_style_property_parse_value() return a CssValue

In that commit, `values` changed from `GValue*` to `GtkCssValue**`,
but one `!G_IS_VALUE (&values[8])` was left untouched. As a result,
if `border` shorthand contains anything after color, it might crash,
depending on memory layout.

New test included.

Fixes: #751
6 years agoMerge branch 'wip/otte/builder' into 'master'
Benjamin Otte [Sat, 23 Nov 2019 17:09:15 +0000 (17:09 +0000)]
Merge branch 'wip/otte/builder' into 'master'

Reorganize various GtkBuilder things

See merge request GNOME/gtk!1204

6 years agobuilder: Make the struct private
Benjamin Otte [Fri, 22 Nov 2019 07:29:32 +0000 (08:29 +0100)]
builder: Make the struct private

We don't want anyone to subclass it - if we want to allow bindings to
extend GtkBuilder, we will be using delegate objects/functions for it.